
import pygame

# 初始化
pygame.init()
# 设置创建窗口大小
screen = pygame.display.set_mode((500, 500))
pygame.display.set_caption("接小球")
point = [250, 20]
# 获取时钟
clock = pygame.time.Clock()
while True:
    # 填充颜色
    screen.fill((0,0,0))
    # 获取事件处理
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
    #         画园
    pygame.draw.circle(screen, (255,0,0), point, 20)
    point[1] += 1
    # 控制每秒最多60帧
    clock.tick(60)
    # 更新
    pygame.display.update()
